home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Modules / BackSpaceModules / Source / AquariumView / RotImage.h < prev    next >
Text File  |  1993-03-12  |  973b  |  42 lines

  1. /*  
  2.  * 
  3.  * MyImage.h    -- How to rotate an NXImage
  4.  * 
  5.  * You may freely copy, distribute, and reuse the code in this example.
  6.  * NeXT disclaims any warranty of any kind, expressed or  implied, as to its
  7.  * fitness for any particular use.
  8.  *
  9.  * Written by Henry Krempel -- NeXT Developer Support
  10.  *
  11.  * Wed Apr 10 17:39:50 1991
  12.  *
  13.  * Modified by Brian Glaeske -- glaeske@plains.NoDak.edu
  14.  *
  15.  * Sat Mar 14 21:06:04 1992
  16.  *
  17.  * I put in more functionality so the range of rotations can be from 0 to 360.
  18.  * The flip: method will flip vertically or horizontally.  Only handles square images nicely.
  19.  *
  20.  */
  21. #import <appkit/NXImage.h>
  22.  
  23. #define HORIZONTAL 0
  24. #define VERTICAL 1
  25.  
  26. @interface RotImage:NXImage
  27. {
  28.     int rotation, flipped, flippedHor, flippedVer;
  29.     NXSize origSize, rotSize, *currentSize;
  30. }
  31.  
  32. - initFromFile:(const char *)fileName;
  33.  
  34. - setRotation:(int)anInt;
  35.  
  36. - (BOOL)drawRepresentation:(NXImageRep *)imageRep inRect:(const NXRect *)rect;
  37.  
  38. - flip:(int)whichWay;
  39.  
  40. @end
  41.  
  42.